<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/template/common/header.jsp"%>
<div class="pageContent">
	<form method="post" action="${base }/tag!doEdit.action"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="58">
			<input type="hidden" name="tag.id" value="${tag.id}" />
			<div class="unit">
				<label>标题：</label> <input type="text" name="tag.title" size="30"
					minlength="4" maxlength="12" class="required" value="${tag.title }" />
			</div>
			<div class="unit">
				<label>分类：</label>
				<c:forEach var="category" items="${categories}">
					<c:if test="${tag.categoryId eq category.id}">
						<c:set var="cateTitle" value="${category.title }" scope="request" />
					</c:if>
				</c:forEach>
				<input type="text" value="${cateTitle }" readonly="readonly"
					size="30">
			</div>
			<div class="divider"></div>
			<table class="list nowrap itemDetail" addButton="添加标签值" width="95%">
				<thead>
					<tr>
						<th type="text" name="tag.values[#index#].val" size="30"
							fieldClass="required" fieldAttrs="{maxlength:30}">值</th>
						<th type="del" width="60">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="value" items="${tag.values}" varStatus="status">
						<tr>
							<td><input type="text" maxlength="30"
								class="required textInput valid" size="30" value="${value.val}"
								name="tag.values[${status.index }].val"></td>
							<td><a class="btnDel " href="javascript:void(0)">删除</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>

</div>